<?php
class xmldb{
	protected $xml;

	function __construct($xnode){
		$this->xml = @simplexml_load_file(ROOTDIR.'xmldb/'.$xnode.'.xml');
		if(!$this->xml) die($xnode.'.xml error!');
	}
	
	public function getxmldb(){
		return (array)$this->xml;
	}
	
	function __destruct(){
		if($this->xml)
			unset($this->xml);	
	}
}
?>
